package com.job.Gai_Yian.Homework0714;

import java.io.IOException;

/**
 * @author Gai_Yian
 * @version 1.0
 * @since 2022-07-15 00:19:42
 */
public class UseRuntime {
    public static void main(String[] args) throws IOException {
        Runtime runtime= Runtime.getRuntime();
        System.out.println(runtime.availableProcessors());
        System.out.println(runtime.maxMemory()/1024/1024+"MB");
        System.out.println(runtime.totalMemory()/1024/1024+"MB");
        System.out.println(runtime.freeMemory()/1024/1024+"MB");

        runtime.exec("mspaint");
        runtime.exec("calc");
        runtime.exec("mstsc");
    }
}
